<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<link rel="stylesheet" href="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/css/order.css" />
	<title>后盾网学员项目-仿哇塞网</title>
</head>
<body>
<?php if(!isset($_SESSION['cart']) or !isset($_SESSION['uid']) or !isset($_SESSION['username'])){?>
	<script type="text/javascript">
		location.href="<?php echo U('Index/index');?>"
	</script>
<?php }?>
<!-- 头部共用 -->
<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><link rel="shortcut icon" href="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/images/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/css/common.css" />
<link rel="stylesheet" href="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/css/index.css" />
<script type='text/javascript' src='http://localhost/qm_shop/hdphp/hdphp/../hdjs/jquery-1.8.2.min.js'></script>
<link href='http://localhost/qm_shop/hdphp/hdphp/../hdjs/css/hdjs.css' rel='stylesheet' media='screen'>
<script src='http://localhost/qm_shop/hdphp/hdphp/../hdjs/js/hdjs.js'></script>
<script src='http://localhost/qm_shop/hdphp/hdphp/../hdjs/js/slide.js'></script>
<script src='http://localhost/qm_shop/hdphp/hdphp/../hdjs/org/cal/lhgcalendar.min.js'></script>
<script type='text/javascript'>
		HOST = 'http://localhost';
		ROOT = 'http://localhost/qm_shop';
		WEB = 'http://localhost/qm_shop/index.php';
		URL = 'http://localhost/qm_shop/index.php/Index/Order/order';
		HDPHP = 'http://localhost/qm_shop/hdphp/hdphp';
		HDPHPDATA = 'http://localhost/qm_shop/hdphp/hdphp/Data';
		HDPHPTPL = 'http://localhost/qm_shop/hdphp/hdphp/Lib/Tpl';
		HDPHPEXTEND = 'http://localhost/qm_shop/hdphp/hdphp/Extend';
		APP = 'http://localhost/qm_shop/index.php/Index';
		CONTROL = 'http://localhost/qm_shop/index.php/Index/Order';
		METH = 'http://localhost/qm_shop/index.php/Index/Order/order';
		GROUP = 'http://localhost/qm_shop/./Qmshop';
		TPL = 'http://localhost/qm_shop/./Qmshop/App/Index/Tpl';
		CONTROLTPL = 'http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order';
		STATIC = 'http://localhost/qm_shop/Static';
		PUBLIC = 'http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public';
		HISTORY = 'http://localhost/qm_shop/index.php/Index/Order/cart';
		HTTPREFERER = 'http://localhost/qm_shop/index.php/Index/Order/cart';
</script>
<script type="text/javascript" src='http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/js/index.js'></script>
<!-- 头部开始 -->
	<div id="header">
		<div class="headBox">
			<div class="headTop">
					<div id="loginCart">
						<?php if(isset($_SESSION['uid']) && isset($_SESSION['username'])){?>
							<div class="fl fixed header_avatar">
								<a class="avatar_new" href="<?php echo U('User/index',array('uid'=>$_SESSION['uid']));?>">
									<img width="30" height="30" 
									<?php if(is_file($uheadimg)){?>
										src="<?php echo $uheadimg;?>"
									<?php  }else{ ?>
										src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/images/avatar.php.jpg"
									<?php }?>>
								</a>
								<div class="username">
									<div class="n_username">
										<a href="<?php echo U('User/index',array('uid'=>$_SESSION['uid']));?>"><?php echo $_SESSION['username'];?> </a>
										<span style="color:#ff762d; font-size:12px;cursor:pointer" onclick="hd_ajax('<?php echo U('LogReg/logout');?>')">退出</span>
									</div>
								</div>
							</div>
						<?php  }else{ ?>
							<div class="login">
								<a href="<?php echo U('LogReg/login');?>">登陆</a>
								<a href="<?php echo U('LogReg/register');?>">注册</a>
							</div>
						<?php }?>
						<div class="cart">
							<a href="<?php echo U('Order/cart');?>">购物车<span class="head_n_kind allNum"><?php if(isset($_SESSION['cart'])){?><?php echo $_SESSION['cart']['total_rows'];?><?php  }else{ ?>0<?php }?></span>件</a>
						</div>
					</div>
					<h1 id="logo">
						<a href="http://localhost/qm_shop"></a>
					</h1>
			</div>
			<div class="headBottom">
				<ul>
					<li class="homePage">
						<a href="http://localhost/qm_shop">首页</a>
					</li>
					<li class="category">
						<a href="<?php echo U('Category/top_list');?>">分类</a>
						<div class="content">
							<div class="widget">
								<div class="cate">
									<div class="catetop fixed">
										<a href="<?php echo U('Category/top_list');?>">
											<p class="english" style="color:#f3142b;">CUSTOM</p>
											<p style="font-size:16px;">全部分类</p>
										</a>
										<a href="<?php echo U('Category/sub_list',array('order'=>'new'));?>">
											<p class="english" style="color:#78dd00;">NEW</p>
											<p style="font-size:16px;">最新</p>
										</a>
										<a href="<?php echo U('Category/sub_list',array('order'=>'hot'));?>">
											<p class="english" style="color:#ff6c00;">HOT</p>
											<p style="font-size:16px;">最热</p>
										</a>
										<a href="<?php echo U('Category/sub_list',array('order'=>'love'));?>">
											<p class="english" style="color:#ff48b4;">LOVE</p>
											<p style="font-size:16px;">喜欢最多</p>
										</a>
									</div>
									<div class="cateitem ct">
										<?php $hd["list"]["value"]["total"]=0;if(isset($topCate) && !empty($topCate)):$_id_value=0;$_index_value=0;$lastvalue=min(8,count($topCate));
$hd["list"]["value"]["first"]=true;
$hd["list"]["value"]["last"]=false;
$_total_value=ceil($lastvalue/1);$hd["list"]["value"]["total"]=$_total_value;
$_data_value = array_slice($topCate,0,$lastvalue);
if(count($_data_value)==0):echo "";
else:
foreach($_data_value as $key=>$value):
if(($_id_value)%1==0):$_id_value++;else:$_id_value++;continue;endif;
$hd["list"]["value"]["index"]=++$_index_value;
if($_index_value>=$_total_value):$hd["list"]["value"]["last"]=true;endif;?>

											<a target="_blank" href="<?php echo U('Category/sub_list',array('cid'=>$value['cid']));?>"><?php echo $value['cname'];?></a>
										<?php $hd["list"]["value"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
									</div>
									<div class="catetag">
										<?php if(is_array($category)):?><?php  foreach($category as $value){ ?>
											<dl class="fixed">
												<dt><?php echo $value['cname'];?>：</dt>
												<dd>
													<?php if(is_array($value['down'])):?><?php  foreach($value['down'] as $v){ ?>
														<a href="<?php echo U('Category/sub_list',array('cid'=>$v['cid']));?>"><?php echo $v['cname'];?></a>
													<?php }?><?php endif;?>
												</dd>
											</dl>
										<?php }?><?php endif;?>
									</div>
									<div class="catemore">
										<a href="<?php echo U('Category/top_list');?>">
											MORE 更多分类 >
										</a>
									</div>
									<div class="dot"></div>
								</div>
							</div>
						</div>
					</li>
					<?php if(is_array($chan)):?><?php  foreach($chan as $value){ ?>
					<li>
						<a href="<?php echo U('Category/sub_list',array('nid'=>$value['nid']));?>"><?php echo $value['nname'];?></a>
					</li>
					<?php }?><?php endif;?>
				</ul>
				<div class="search">
					<form action="<?php echo U('Search/index');?>" method="post">
						<input type="text" placeholder="请输入要搜索的关键词" name="keyword"/>
						<input type="submit" value="" class="searchBtn">
					</form>
				</div>
			</div>
		</div>
	</div>
<!-- 头部结束 -->
<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><script type="text/javascript" src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/js/reglog.js"></script>
<script type="text/javascript" src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/js/tc.min.js"></script>
<div id="alertlogin" style="display:none">
	<div id="loginDiv" class="contentWarp" style="z-index: 5000; position: absolute; left: 376px; top: 140px; width: 535px; height: auto; display: block;">
		<div class="logoTip">
			<div class="logoTip-top">
				<div class="logoTip-top-close">
					<a href="javascript:close_popup()">close</a>
					<script type="text/javascript" >
						function close_popup(){
					    	$('#alertlogin').hide();
					    	$('#maskLayer').remove();
					    }
					</script>
				</div>
				<div class="logoTip-top-text ms_yahei">登录哇噻网</div>
			</div>
			<div class="logoTip-input">
				<form id="login_form1" method="post" action="<?php echo U('LogReg/login');?>" onsubmit="return hd_submit(this,'http://localhost/qm_shop/index.php/Index/Order/order')">
					<p style="width:auto">
						<label class="ms_yahei">账号：</label>
						<input id="account" type="text" name="account" style="line-height:33px">
					</p>
					<p style="width:auto">
						<label class="ms_yahei">密码：</label>
						<input id="password" type="password" name="password" style="line-height:33px">
					</p>
					<p style="width:auto">
						<label class="ms_yahei">验证码：</label>
						<input id="password" type="password" name="code" style="line-height:33px" placeholder="不区分大小写">
					</p>
					<p style="width:auto">
						<label class="ms_yahei"></label>
						<img src="<?php echo U('LogReg/code');?>" alt="验证码占位" onclick="refresh()" id="imgCode">
						<a href="javascript:refresh()" style="color:#229CA0;margin-left:10px;">看不清,换一张</a>
						<script>
							imgSrc = $('#imgCode').attr('src');
							function refresh(){
								$('#imgCode').attr('src', imgSrc + '?&' + Math.random());
							}
						</script>
					</p>
					<span class="rember-user ms_yahei">
						<input id="autoLogin" type="checkbox" name="autoLogin" value="1">
					记住我一周(在公共场所请慎用此功能)
					</span>
					<dl class="logoTip-button">
						<dt>
							<input type="submit" value="登录" name="login">
						</dt>
						<dd>
							<a class="ms_yahei" title="注册" href="<?php echo U('LogReg/register');?>">还没账号?</a>
						</dd>
					</dl>
				</form>
				<div class="clear"></div>
			</div>
		</div>
	</div>
</div>
<!-- 用于ajax发送的地址 -->
<script type="text/javascript">
	var add_address_url=APP+'&c=Order&ajax_add_address';//添加新地址
</script>
<script type="text/javascript" src='http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/js/order.js'></script>
<!-- 头部结束 -->
<div id="order" class="fixed" style="width:980px;margin:50px auto">
	<div id="use_newaddress" class="newaddress_box" style="display: none; left: 255.5px; top: 182px;">
		<div class="newaddress_box_tit">
		 	添加地址
			<img src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/images/newaddress_tit_close.jpg" onclick="close_address()">
			<script type="text/javascript" >
				function close_address(){
			    	$('#use_newaddress').hide();
			    	$('#maskLayer').remove();
			    }
			</script>
		</div>
		<form id="new_address_form" method="post" name="new_address_form" action="javascript:">
			<p class="newaddress_box_name">
				<span class="shouhuoren">收货人：</span>
				<span class="shouhuoren_text_box">
					<input id="consignee" class="text1" type="text" name="consignee">
				</span>
			</p>
			<p class="detailinfo">
				<span class="detailinfo_text">详细地址：</span>
				<span class="detail_input">
					<input id="address" class="text1" type="text" style="width:315px; height:46px;" name="address">
				</span>
			</p>
			<p class="post_number">
				<span class="post_number_text">邮政编码：</span>
				<span class="post_number_input">
					<input id="zipcode" class="text1" type="text" name="zipcode">
				</span>
			</p>
			<p class="phonenumber">
				<span class="shr_phonenumber">收货电话：</span>
				<span class="shr_phonenumber_box">
					<input id="phone_mob" class="text1" type="text" name="phone_cnee">
				</span>
				<span style="margin-left:10px;font-size:12px;color:#999">如果收货人不是买家本人才需填写</span>
			</p>
			<p class="phonenumber">
				<span class="shr_phonenumber">买家电话：</span>
				<span class="shr_phonenumber_box" style="width:450px;">
					<input id="phone_mob" class="text1" type="text" name="phone_buyer">
				</span>
			</p>
			<p class="save_address">
				<input id="save_address" type="checkbox" name="save_address" value="1" checked="checked" style="float:left; display:block;">
				<span style="float:left;">自动保存收货地址（选择后该地址将会保存到您的收货地址列表）</span>
			</p>
			<dl class="confirm" style="padding-bottom: 10px">
				<dt>
					<input type="submit" value=""/>
				</dt>
				<dd><a onclick="form_reset()" href="javascript:void(0);" class="color3B">重置</a></dd>
				<script type="text/javascript">
					function form_reset () {
						document.new_address_form.reset();
					}
				</script>
			</dl>
		</form>
	</div>
	<form action="<?php echo U('Order/go_payment');?>" id="orderform" name="orderform" method="post">
		<div class="confirm_order_info_box">
			<p class="confirm_orderinfo_status">
				<img alt="订单状态" src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/images/confirm_orderinfo_status.jpg">
			</p>
			<div class="confirm_address">
				<span>
					
				</span>
			</div>
			<ul id="show_address" class="other_more_address" <?php if(!empty($address_data)){?>style="display:block"<?php  }else{ ?>style="display:none"<?php }?>>
				<li class="default_address">
					<span class="send_to">寄送至</span>
					<span class="other_address_radio">
						<input type="radio" checked="checked" class="xuanze" onclick="return false">
					</span>
					<span class="other_address_info"><?php echo $address;?></span>
				</li>
			</ul>
			<p id="add_address" class="use_new_address">
				<?php if(isset($_SESSION['uid']) && isset($_SESSION['username'])){?>
					<img title="添加新地址" src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/images/use_new_address.jpg" onclick="popWin('use_newaddress')">
				<?php  }else{ ?>
					<img title="添加新地址" src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/images/use_new_address.jpg" onclick="popWin('alertlogin')">
				<?php }?>
			</p>
			<div class="clear"></div>
			<h1>
				<img alt="确认订单信息" src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/images/confirm_orderinfo_tit.jpg">
			</h1>
			<?php if(isset($_SESSION['cart']['goods'])){?>
				<div id="orderList">
					<ul class="confirm_order_content_tit">
						<li class="li_one">店铺宝贝</li>
						<li class="li_two">分类</li>
						<li class="li_three">单价</li>
						<li class="li_four">数量</li>
						<li class="li_five">优惠</li>
						<li class="li_six">小计（元）</li>
					</ul>
					<p class="confirm_order_content_catename">
						共计：
						<a target="_blank" href="" class="color3B"><?php echo $_SESSION['cart']['total_rows'];?>件</a>
					</p>
					<?php if(is_array($_SESSION['cart']['goods'])):?><?php  foreach($_SESSION['cart']['goods'] as $key=>$value){ ?>
						<?php if($value['num'] <> 0){?>
							<div class="confirm_order_content_con ">
								<dl>
									<dt>
										<img width="75" height="75" title="<?php echo $value['name'];?>" src="<?php echo $value['imgUrl'];?>">
									</dt>
									<dd>
										<p>
											<a target="_blank" href="" class="color3B"><?php echo $value['name'];?></a>
										</p>
										<p>颜色:<?php echo $value['options']['color'];?> 尺码:<?php echo $value['options']['size'];?></p>
									</dd>
								</dl>
								<span class="confirm_order_content_wasaimoney"><?php echo $value['cate'];?></span>
								<span class="confirm_order_content_danjia">
									<input name="lgoods[<?php echo $key;?>][lprice]" type="hidden" value="<?php echo $value['price'];?>">
									￥<?php echo $value['price'];?>
								</span>
								<span class="confirm_order_content_num">
									<input name="lgoods[<?php echo $key;?>][lnumber]" type="hidden" value="<?php echo $value['num'];?>">
									<?php echo $value['num'];?>
								</span>
								<span class="confirm_order_content_youhui">--</span>
								<input type="hidden" name="lgoods[<?php echo $key;?>][lmoney]" value="<?php echo $value['total'];?>
								"/>
								<input type="hidden" name="lgoods[<?php echo $key;?>][qm_combine_bid]" value="<?php echo $value['bid'];?>"/>
								<input type="hidden" name="lgoods[<?php echo $key;?>][qm_goods_gid]" value="<?php echo $value['id'];?>"/>
								<span class="confirm_order_content_xiaoji"> ￥<?php echo $value['total'];?></span>
							</div>
						<?php }?>
					<?php }?><?php endif;?>
					<div class="confirm_order_content_con " style="border-bottom:none">
						<div class="last_info">
							<div id="sure_address" class="order_last_info_in">
								<p>
								实际付款：<em>￥<?php echo $_SESSION['cart']['total'];?></em>
								<input type="hidden" name="ototal" value="<?php echo $_SESSION['cart']['total'];?>"/>
								</p>
							</div>
						</div>
						<div class="submit_order">
							<ul>
								<li class="goback">
									<a href="<?php echo U('cart');?>" class="color3B">返回购物车</a>
								</li>
								<li>
									<?php if(isset($_SESSION['uid']) && isset($_SESSION['username'])){?>
										<div id="submitbox" <?php if(isset($address)){?>style="display:block"<?php  }else{ ?>style="display:none"<?php }?>>
											<input type="hidden" value="<?php echo $address_data['rconsignee'];?>" name="oconsignee"/>
											<input type="hidden" value="<?php echo $address_data['raddress'];?>" name="oaddress"/>
											<input type="hidden" value="<?php echo $address_data['rzipcode'];?>" name="ozipcode"/>
											<input type="hidden" value="<?php echo $address_data['rphone_cnee'];?>" name="ophone_cnee"/>
											<input type="hidden" value="<?php echo $address_data['rphone_buyer'];?>" name="ophone_buyer"/>
											<input type="submit" value="">
										</div>
										<div id="addressbox" <?php if(isset($address)){?>style="display:none"<?php  }else{ ?>style="display:block"<?php }?>>
											<a name="alertaddress" href="javascript:" onclick="popWin('use_newaddress')"><img title="添加新地址" src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/images/submit_order.jpg"></a>
										</div>
									<?php  }else{ ?>
										<a name="login" href="javascript:" onclick="popWin('alertlogin')"><img title="登陆" src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Order/images/submit_order.jpg"></a>
									<?php }?>
								</li>
							</ul>
						</div>
					</div>
				</div>
			<?php  }else{ ?>
				<div style="margin-left:20px;margin-top:35px;">
					确认订单信息,需要您登陆都才能查看.你可以<a href="<?php echo U('LogReg/login');?>" style="text-decoration: underline;color:#06C7D3"> [立即登陆] </a>，当然您也可以先浏览其他宝贝！
				</div>
			<?php }?>
		</div>
	</form>
</div>
<!-- 页脚共用 -->
<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!-- 底部版权信息开始 -->
<div id="footer">
	<!-- <div class="footerTop">
		<div class="footerTopCon fixed">
			<div class="jingcai fl">
				<p class="fTitle">更多精彩</p>
				<ul>
					<li>
						<a href="" target="_blank">闪购</a>
					</li>
					<li>
						<a href="" target="_blank">闪购</a>
					</li>
					<li>
						<a href="" target="_blank">闪购</a>
					</li>
					<li>
						<a href="" target="_blank">闪购</a>
					</li>
					<li>
						<a href="" target="_blank">闪购</a>
					</li>
					<li>
						<a href="" target="_blank">闪购</a>
					</li>
				</ul>
			</div>
			<div class="chengnuo fl">
				<p class="fTitle">我们承诺</p>
				<ul>
					<li>365天不打烊</li>
					<li>365天不打烊</li>
					<li>365天不打烊</li>
					<li>365天不打烊</li>
					<li>365天不打烊</li>
					<li>365天不打烊</li>
				</ul>
			</div>
			<div class="guanzhu fl">
				<p class="fTitle">在这里关注我们</p>
				<ul>
					<li><a href="" target="_blank">新浪微博</a>
					</li>
					<li><a href="" target="_blank">新浪微博</a>
					</li>
					<li><a href="" target="_blank">新浪微博</a>
					</li>
				</ul>
			</div>
			<div class="tdCode fl"><img src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/images/edCode.png" alt="二维码占位" /></div>
		</div>
	</div> -->
	<div class="footerBottom">
		<div class="footerBottomCon">
			<p class='footerqm'>后盾网 人人做后盾</p>
			<div class="footerNav ct">
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
				<a href="javascript:">关于我们</a>
			</div>
			<!-- <p class="beian ct">北京哇噻网信息技术有限公司 WowSai.com Copyright© 2008-2013 [京ICP备10020900][京ICP证090011号]</p> -->
			<p class="beian ct">此项目只是用于个人学习提高,如有需要，请记住我：陈磊；TEL：18976686378；QQ：18976686378。</p>
			<div class="zhengshu">
				<a href="" target="_blank"><img src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/images/108_40_cart.png" alt="证书图片占位" /></a>
				<a href="" target="_blank"><img src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/images/108_40_cart.png" alt="证书图片占位" /></a>
				<a href="" target="_blank"><img src="http://localhost/qm_shop/./Qmshop/App/Index/Tpl/Public/images/108_40_cart.png" alt="证书图片占位" /></a>
			</div>
		</div>
	</div>
	<div class="footerBlank fixed"></div>
</div>
<!-- 底部版权信息结束 -->
</body>
</html>